#pragma once
#include"HashTable.h"
namespace bit
{
	template<class K>
	class UnorderedSet
	{
	public:
		struct KeyofT
		{
			const K& operator()(const K& kv)
			{
				return kv;
			}
		};
		typedef typename hash_bucket::Hash_Table<K, K, KeyofT>::const_iterator iterator;
		typedef typename hash_bucket::Hash_Table<K, K, KeyofT>::const_iterator const_iterator;
		const_iterator begin()const
		{
			return set.begin();
		}
		const_iterator end()const
		{
			return set.end();
		}
		pair<const_iterator, bool> insert(const K& key)
		{
			pair<typename hash_bucket::Hash_Table<K, K, KeyofT>::iterator, bool>  it = set.Insert(key);
			//return pair<typename hash_bucket::Hash_Table<K, K, KeyofT>::const_iterator, bool>(it.first, it.second);
			return std::make_pair(it.first, it.second);
		}
	private:
		hash_bucket::Hash_Table<K, K, KeyofT> set;
	};
}